package server;

import java.io.IOException;

public class LagouServlet1 extends HttpServlet {
    public void doGet(Request request, Response response) {
        System.out.println("demo1 -- LagouServlet1 -- GET");
        try {
            response.output(HttpProtocolUtil.getHttpHeader200("demo1 -- LagouServlet1 -- GET".length()) + "demo1 -- LagouServlet1 -- GET");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void doPost(Request request, Response response) {
        System.out.println("demo1 -- LagouServlet1 -- POST");
        try {
            response.output(HttpProtocolUtil.getHttpHeader200("demo1 -- LagouServlet1 -- POST".length()) + "demo1 -- LagouServlet1 -- POST");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void init() throws Exception {

    }

    public void destory() throws Exception {

    }
}
